package com.example.anno.factory;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.core.PriorityOrdered;
import org.springframework.stereotype.Service;

@Service
public class CustomPriorityOrderedBeanFactoryProcessor implements BeanFactoryPostProcessor,
        PriorityOrdered {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        System.out.println("--->PriorityOrderedBeanFactory Post Process") ;
    }

    @Override
    public int getOrder() {
        return Integer.MAX_VALUE;
    }
}
